import BulletList from "@tiptap/extension-bullet-list";

// 自定义无序列表扩展，支持多种列表样式
export default BulletList.extend({
  content: "listItem*",
  addAttributes() {
    return {
      listType: {
        default: "disc",
        parseHTML: (element: HTMLElement) =>
          element.getAttribute("type") || element.style.getPropertyValue("list-style-type") || "disc",
        renderHTML: ({ listType }: { listType: string }) => {
          return {
            type: listType,
            style: `list-style-type: ${listType}`,
          };
        },
      },
    };
  },
});
